import request from '@/utils/request'

// 获取厂站列表带分页
export function page(query) {
  return request({
    url: '/v1/GET/factory/station/page',
    method: 'get',
    params: query
  })
}

// 获取厂站列表，不带分页
export function getAllFactoryStation(query) {
  return request({
    url: '/v1/GET/factory/station/list',
    method: 'get',
    params: query
  })
}

// 获取厂站单条信息
export function getFactoryStationDetail(id) {
  return request({
    url: '/v1/GET/factory/station/' + id,
    method: 'get'
  })
}

// 新增厂站信息
export function insertFactoryStation(data) {
  return request({
    url: '/v1/POST/factory/station',
    method: 'post',
    data: data
  })
}

// 修改厂站信息
export function updateFactoryStation(data) {
  return request({
    url: '/v1/PUT/factory/station',
    method: 'put',
    data: data
  })
}
// 初始化配置数据到缓存
export function initCache() {
  return request({
    url: '/v1/POST/factory/station/cache',
    method: 'POST',
  })
}
// 删除单个或多个厂站信息
export function delFactoryStation(ids) {
  return request({
    url: '/v1/DELETE/factory/station/' + ids,
    method: 'delete'
  })
}

